package com.free.food.order.controller;

import com.free.food.order.mq.receiver.StreamClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

/**
 * 类功能描述：
 *
 * @author：刘富国
 * @createTime：2019-02-27 17:50
 */
@RestController
public class MessageController {

    @Autowired
    private StreamClient streamClient;


    @GetMapping("/sendMessage")
    public void process() {

        streamClient.output().send(MessageBuilder.withPayload(Arrays.asList("qwe", "asd", "zcx")).build());
    }
}
